<?php
/**
 * fileid: advs.php
 * Create date: 21/05/2012 by Pham Hung Cuong
 * */

define('APPTYPEID', 138);
define('CURSCRIPT', 'advs');
require_once './source/class/class_core.php';
$discuz = &discuz_core::instance();
$discuz->init();

global $_G;

$url = rawurldecode($_G['gp_url']);
$advid = $_G['gp_adsid'] ? intval( $_G['gp_adsid']) : 0;

if($advid > 0){
	DB::query("UPDATE " . DB::table('common_advertisement') ." SET click = click + 1 WHERE advid = $advid");
}

dheader("location: $url");

